This resource endpoint retrieves the properties of specific protected
path. Specify the protected path id returned when creating a protecting
path for {id}
the request URI.
URL Parameters | |
---|---|
format |
The format of the returned data. Can be html ,
json , or xml (default). This value overrides
the Accept header if both are present.
|
Request Headers | |
---|---|
Accept |
The expected MIME type of the request body. If the format
parameter is present, it takes precedence over the Accept header.
|
A successful call to the endpoint will return the HTTP code
200 OK
. The format of the data in the response
body depends on the format
parameter or Accept header.
Security
role,
or the following privilege:
http://marklogic.com/xdmp/privileges/manage-admin
The structure of the output returned from this REST API is as follows:
path-id
path-expression
path-namespaces
This is a complex structure with the following children:
path-namespace
This is a complex structure with the following children:
prefix
namespace-uri
permissions
This is a complex structure with the following children:
permission
This is a complex structure with the following children:
role-id
role-name
capability
path-set
curl -X GET --anyauth --user username:password -i -H "Content-type: application/xml" \ http://localhost:8002/manage/v2/protected-paths/4818252820611606393/properties ==> MarkLogic responds with output similar to the following. HTTP/1.1 200 OK ETag: 867a3d5a8dae2aed4f0d8fe4038fecd9 Content-type: application/xml; charset=UTF-8 Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 397 Connection: Keep-Alive Keep-Alive: timeout=5 <protected-path-properties xmlns="http://marklogic.com/manage/protected-path/properties"> <path-id>4818252820611606393</path-id> <path-expression>/root/reg[fn:matches(@expr, 'is')]</path-expression> <path-namespaces/> <permissions> <permission> <role-name>els-role-2</role-name> <capability>read</capability> </permission> </permissions> </protected-path-properties>
curl -X GET --anyauth --user username:password -i -H "Content-type: application/json" \ http://localhost:8002/manage/v2/protected-paths/4818252820611606393/properties ==> MarkLogic responds with output similar to the following. HTTP/1.1 200 OK ETag: 867a3d5a8dae2aed4f0d8fe4038fecd9 Content-type: application/json; charset=UTF-8 Cache-Control: no-cache Expires: -1 Server: MarkLogic Content-Length: 153 Connection: Keep-Alive Keep-Alive: timeout=5 { "path-id": "4818252820611606393", "path-expression": "/root/reg[fn:matches(@expr, 'is')]", "permission":[ {"role-name": "els-role-2", "capability": "read"} ] }
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.